package it.polimi.TravelDream;

import java.io.Serializable;

import javax.persistence.*;


/**
 * The persistent class for the packexlinker database table.
 * 
 */
@Entity
@NamedQueries({
@NamedQuery(name="Packexlinker.findAll", query="SELECT p FROM Packexlinker p"),
@NamedQuery(name="Packexlinker.findByPack", query="SELECT spel FROM Packexlinker spel WHERE spel.savedpackage.id LIKE :param" ),
@NamedQuery(name="Packexlinker.eliminateByPack", query="DELETE FROM Packexlinker spel WHERE spel.savedpackage.id = :param" )
})

public class Packexlinker implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private PackexlinkerPK id;

	private int leftToBeP;

	//bi-directional many-to-one association to Excursion
	@ManyToOne
	@JoinColumn(name="ExcursionID")
	private Excursion excursion;

	//bi-directional many-to-one association to Savedpackage
	@ManyToOne
	@JoinColumn(name="PackageID")
	private Savedpackage savedpackage;

	public Packexlinker() {
	}

	public PackexlinkerPK getId() {
		return this.id;
	}

	public void setId(PackexlinkerPK id) {
		this.id = id;
	}

	public int getLeftToBeP() {
		return this.leftToBeP;
	}

	public void setLeftToBeP(int leftToBeP) {
		this.leftToBeP = leftToBeP;
	}

	public Excursion getExcursion() {
		return this.excursion;
	}

	public void setExcursion(Excursion excursion) {
		this.excursion = excursion;
	}

	public Savedpackage getSavedpackage() {
		return this.savedpackage;
	}

	public void setSavedpackage(Savedpackage savedpackage) {
		this.savedpackage = savedpackage;
	}

}